package com.gitee.jktantan.datasource.monitor.analyze.p6spy;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

/**
 * 数据源
 * 因为p6spy无法获取数据源名称，所以这里只有id和url
 */
@Getter
@Setter
public class DataSourceEntry {
    private String id;
    private String url;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DataSourceEntry that = (DataSourceEntry) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
